/**
 * This file is part of Adaptools.
 * 
 * Adaptools is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Adaptools is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 * along with Adaptools.  If not, see http://www.gnu.org/licenses/. 
 */
package org.adaptools.base;

import java.util.Collection;

/**
 * Interface to Queue.
 * 
 * @author Denys G. Santos (gsdenys@gmail.com)
 * @since 3.0.0
 */
public interface Queue extends Copyable<Queue>{
		
	/**
	 * Check if has next element in the queue
	 *  
	 * @return boolea
	 */
	public boolean hasNext();
	
	
	/**
	 * Load value to the {@link BasicQueue}. This {@link BasicQueue} will use the
	 * input parameter as input {@link String} and the separator as value to
	 * split string.
	 * 
	 * @param input
	 * @param separator
	 */
	public void load(String input, String separator);
	
	/**
	 * Load value to the {@link BasicQueue}. this method not use separator, so each
	 * symbol is a token to be consumed.
	 * 
	 * @param input
	 */
	public void load(String input);
	
	/**
	 * Read the element end put the pointer to the next element. if the pointer
	 * is settled in stack overflow this method returns null.
	 * 
	 * @return element in the queue head
	 */
	public String pull();
	
	/**
	 * Read the queue head. Case the head in stack overflow its returns null
	 * 
	 * @return the head of queue
	 */
	public String read();
	
	/**
	 * Read the next queue element (head + 1). Case the head or the next in
	 * stack overflow its returns null
	 * 
	 * @return the (head + 1) queue element
	 */
	public String readNext();

	/**
	 * Read the previous queue element (head - 1). Case the previous in stack
	 * overflow its returns null
	 * 
	 * @return the (head - 1) queue element
	 */
	public String readPrevious();

	/**
	 * Read the next N queue element (head + n). Case the next N in stack
	 * overflow its returns null
	 * 
	 * @return the (head + n) queue element
	 */
	public String readNext(Integer value);

	/**
	 * Read the previous queue element (head - 1). Case the previous in stack
	 * overflow its returns null
	 * 
	 * @return the (head - 1) queue element
	 */
	public String readPrevious(Integer value);

	/**
	 * Add a new string to the queue
	 * 
	 * @param value
	 */
	public void add(String value);
	
	/**
	 * Add a new string to the queue
	 * 
	 * @param value
	 */
	public void addAll(Collection<String> stringCollection);
	
	/**
	 * @return the pointer
	 */
	public Integer getPointer();

	/**
	 * @param pointer
	 *            the pointer to set
	 */
	public void setPointer(Integer pointer);

	/**
	 * @return the {@link Collection}
	 */
	public Collection<String> getCollection();

	/**
	 * @param Collection the Collection to set
	 */
	public void setCollection(Collection<String> Collection);
}